package com.example;


public class TaxTest {
    public static void main(String[] args) {
        System.out.println("===== 开始个税计算测试 =====");

        TaxCalculation tax = new TaxCalculation();
        tax.setMonthlySalary(15000); // 测试数据

        System.out.println("输入月薪: " + tax.getMonthlySalary());

        TaxCalculation result = TaxCalculator.calculate(tax);

        System.out.println("\n===== 计算结果 =====");
        System.out.println("税前年薪: " + result.getAnnualSalary());
        System.out.println("适用税率: " + (result.getTaxRate() * 100) + "%");
        System.out.println("速算扣除数: " + result.getQuickDeduction());
        System.out.println("应纳税额: " + result.getTax());
        System.out.println("税后年薪: " + result.getNetSalary());
        System.out.println("月均税后工资: " + (result.getNetSalary() / 12));
    }

}